package com.check.dao.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.ibatis.sqlmap.client.SqlMapClient;

@SuppressWarnings("deprecation")
public class BaseSqlMapDao extends SqlMapClientDaoSupport {
	
		@Autowired
		public void setSqlMapClientForAutowire(SqlMapClient sqlMapClient) {
		        super.setSqlMapClient(sqlMapClient);
		}
		/**
		 *  @param String spaceAndName : ibatis's name and sqlSpace'Id
		 *  @param Object
		 *  @return Object
		 * */
		public Object findObject(String spaceAndName,Object object){
			return getSqlMapClientTemplate().queryForObject(spaceAndName, object);
		}
		
		public Object findObject(String spaceAndName){
			return getSqlMapClientTemplate().queryForObject(spaceAndName);
		}
		
		public void insertObject(String spaceAndName, Object object){
			getSqlMapClientTemplate().insert(spaceAndName, object);
		}
		
		public void deleteObject(String spaceAndName,Object object){
			getSqlMapClientTemplate().delete(spaceAndName, object);
		}
		
		public void updateObject(String spaceAndName, Object object){
			getSqlMapClientTemplate().update(spaceAndName, object);
		}

	
}
